<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
   //世界时钟
    var bjDate = new Date();
    var timeZone = bjDate.getTimezoneOffset()/60;
    console.log(timeZone);
    var UTCTimer = bjDate.getTime()+timeZone*3600*1000;
    console.log(UTCTimer);
    var worldUTCConfig = {
        'shanghai':8,
        'jp':9,
        'us':-6
    }
    for(var i in worldUTCConfig){
        var tDate = new Date(UTCTimer+worldUTCConfig[i]*3600*1000)
        console.log(i+':'+tDate.getFullYear()+'-'+(tDate.getMonth()+1)+'-'+tDate.getDate()+' '+tDate.getHours()+':'+tDate.getMonth()+':'+tDate.getSeconds()+'')
    }
</script>
</body>
</html>